package com.kaili.pojo.dto.appoint;

import com.kaili.pojo.vo.CustomerVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author xjh
 * @ClassName EwbAppointAddBean
 * @Description 预约登记新增实体类
 * @Date 下午2:13 18-5-21
 * @Version 1.0
 */
@Data
public class EwbAppointAddDTO {

    @Pattern(regexp = "^[A-Za-z0-9]{0,30}$",message = "预约号应为[A-Za-z0-9]组成的1-30位字符")
    @ApiModelProperty("预约单号")
    private String appointNo;

    @NotNull(message = "目的地不可为空")
    @ApiModelProperty("目的地")
    private Integer cityId;

    @NotNull(message = "预约发货时间不可为空")
    @ApiModelProperty("预约发货时间")
    private Date appointSendTime;

    @Size(min=1,max=4,message = "货物明细应为1-4件")
    @ApiModelProperty("货物信息列表")
    private List<AppointGoodsAddDTO> appointGoodsList;

    @NotNull(message = "发件人ID不可为空")
    @ApiModelProperty("发件人ID")
    private String sendCustomerId;

    @NotNull(message = "收件人ID不可为空")
    @ApiModelProperty("收件人ID")
    private String receiveCustomerId;

    @ApiModelProperty("备注")
    private String remark;

    @NotNull(message = "总件数不可为空")
    @ApiModelProperty("总件数")
    private Integer totalPiece;

    @NotNull(message = "总重量不可为空")
    @ApiModelProperty("总重量")
    private BigDecimal totalWeight;

    @NotNull(message = "总体积不可为空")
    @ApiModelProperty("总体积")
    private Double totalVol;

    @ApiModelProperty("接货费")
    private Double totalDeliveryCharge;

    @NotNull(message = "数据来源不能为空")
    @ApiModelProperty("来源,1标示web端,2标示PDA端")
    private Integer sourceType;
}
